# -*- coding: utf-8 -*-
import sys
sys.path.append("../../quidditas")

import pygame
import quidditas

class SpriteComponent(object):
    def __init__(self, img_name):
        self.sprite = pygame.sprite.Sprite()
        self.sprite.image = load_image(img_name, -1)
        self.sprite.rect = self.sprite.image.get_rect()

class HealthComponent(object):
    def __init__(self, initial=100):
        self.hp = initial

class ChimpComponent(object):
    def __init__(self):
        self.dizzy = False
        self.move = 9
        self.original = None

class FistComponent(object):
    def __init__(self):
        self.is_punching = False

def load_image(name, colorkey=None):
    image = pygame.image.load("res/" + name + ".bmp")
    image = image.convert()
    if colorkey is not None:
        if colorkey is -1:
            colorkey = image.get_at((0,0))
        image.set_colorkey(colorkey, pygame.RLEACCEL)
    return image
